#pragma once
#include "fxcc/core/graph/common/pch.h"
#include "fxcc/core/graph/common/Type.h"

namespace fxcc
{
    namespace graph
    {
        namespace common
        {
            struct FXCC_API     LightData
            {
                std::string m_Name;

                glm::vec3 m_Position;
                glm::vec3 m_Direction;
                glm::vec3 m_Up;

                struct FXCC_API     EffectData
                {
                    enum class Type
                    {
                        _LightData_none = 0x0,
                        _LightData_directioon = 0x1,
                        _LightData_point = 0x2,
                        _LightData_spot = 0x3,
                        _LightData_ambient = 0x4,
                        _LightData_area = 0x5,
                        _LightData_end_
                    } m_Type = Type::_LightData_directioon;

                    bool IsDir() const
                    {
                        return m_Type == Type::_LightData_directioon;
                    }
                    bool IsPoint() const
                    {
                        return m_Type == Type::_LightData_point;
                    }

                    bool IsArea() const
                    {
                        return m_Type == Type::_LightData_area;
                    }
                    bool IsSpot() const
                    {
                        return m_Type == Type::_LightData_spot;
                    }
                    float m_AttenuationConstant{ 1.0f };
                    float m_AttenuationLinear{ 0.09 };
                    float m_AttenuationQuadratic{ 0.032 };

                    glm::vec3 m_ColorDiffuse = { 0.5f, 0.5f, 0.5f };
                    glm::vec3 m_ColorSpecular = { 0.5f, 0.5f, 0.5f };
                    glm::vec3 m_ColorAmbient={ 0.5f, 0.5f, 0.5f };
                    
                    glm::vec3 m_PbrColor = glm::vec3(1.0f);
                    float m_PbrLightStrength{ 300.0f };

                    float m_AngleInnerCone= 12.5f;
                    float m_AngleOuterCone = 15.0f;
                    
                    float m_Shininess{ 32.0f };

                    glm::vec2 m_Size = { 10,10 };
                } m_EffectData;

                LightData(aiLight *LightData);

            };
        }
    }
}